Made DB rollback() method properly bail out if no trx is active
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 25 Jun 2014 17:17:21 +0000 (10:17 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 25 Jun 2014 17:17:21 +0000 (10:17 -0700)
Change-Id: I157b3c9e7a869866c08d127cb7f9277582e1bc9e

includes/db/Database.php

index 7bbcc2f..4ff38c5 100644 (file)
@@ -3525,6 +3525,7 @@ abstract class DatabaseBase implements IDatabase, DatabaseType {
                if ( $flush !== 'flush' ) {
                        if ( !$this->mTrxLevel ) {
                                wfWarn( "$fname: No transaction to rollback, something got out of sync!" );
+                               return; // nothing to do
                        } elseif ( $this->mTrxAutomatic ) {
                                wfWarn( "$fname: Explicit rollback of implicit transaction. Something may be out of sync!" );
                        }